<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<script src="./jquery.min.js"></script>
<script src="./common.js"></script>
<style type="text/css">
	<!--
	body {
		font-family: Arial, Helvetica, sans-serif;
		font-size:12px;
		color:#666666;
		background:#fff;
		text-align:left;
	}
	a {
		color:#1E7ACE;
		text-decoration:none; 
	}
	a:hover {
		color:#000;
		text-decoration:underline;
	}
	h3 {
		font-size:14px;
		font-weight:bold;
	}
	
	pre,p {
		color:#1E7ACE;
		margin:4px;
	}
	
	table { 
		border-collapse: collapse;
		margin: 0 auto;
		text-align: left;
	}
	 
	table td, table th {
		border: 1px solid #cad9ea;
		color: #666;
		height: 30px;
		padding-left:20px;
		padding-right:60px;
	}
	 
	table thead th {
		background-color: #CCE8EB;
		width: 100px;
	}
	 
	table tr:nth-child(odd) {
		background: #fff;
	}
	 
	table tr:nth-child(even) {
		background: #F5FAFA;
	}
	
	-->
</style>
<script>
var appMap = new Map();
appMap.set("com.x.base.core.project.x_program_center", "中心服务");
appMap.set("com.x.base.core.project.x_attendance_assemble_control", "考勤相关服务");
appMap.set("com.x.base.core.project.x_bbs_assemble_control", "论坛相关服务");
appMap.set("com.x.base.core.project.x_calendar_assemble_control", "日程管理相关服务");
appMap.set("com.x.base.core.project.x_cms_assemble_control", "内容管理平台相关服务");
appMap.set("com.x.base.core.project.x_component_assemble_control","组件管理");
appMap.set("com.x.base.core.project.x_file_assemble_control", "云文件相关服务");
appMap.set("com.x.base.core.project.x_general_assemble_control", "常用功能");
appMap.set("com.x.base.core.project.x_hotpic_assemble_control", "热点信息相关服务");
appMap.set("com.x.base.core.project.x_meeting_assemble_control", "会议管理相关服务");
appMap.set("com.x.base.core.project.x_message_assemble_communicate", "消息通信相关服务");
appMap.set("com.x.base.core.project.x_mind_assemble_control", "脑图模块相关服务");
appMap.set("com.x.base.core.project.x_okr_assemble_control", "执行力相关服务");
appMap.set("com.x.base.core.project.x_organization_assemble_authentication", "组织认证服务");
appMap.set("com.x.base.core.project.x_organization_assemble_control", "组织管理接口");
appMap.set("com.x.base.core.project.x_organization_assemble_express", "组织查询接口");
appMap.set("com.x.base.core.project.x_organization_assemble_personal", "个人设置相关服务");
appMap.set("com.x.base.core.project.x_portal_assemble_designer", "门户使用接口");
appMap.set("com.x.base.core.project.x_portal_assemble_surface", "门户手机服务");
appMap.set("com.x.base.core.project.x_processplatform_assemble_bam", "流程平台统计服务");
appMap.set("com.x.base.core.project.x_processplatform_assemble_designer", "流程元素设计");
appMap.set("com.x.base.core.project.x_processplatform_assemble_surface", "流程数据操作");
appMap.set("com.x.base.core.project.x_processplatform_service_processing", "流程过程服务");
appMap.set("com.x.base.core.project.x_query_assemble_designer", "数据平台元素设计");
appMap.set("com.x.base.core.project.x_query_assemble_surface", "数据平台查询");
appMap.set("com.x.base.core.project.x_query_service_processing", "数据平台全文检索");
appMap.set("com.x.base.core.project.x_teamwork_assemble_control", "团队");
appMap.set("com.x.wcrm.assemble.control.x_wcrm_assemble_control", "WCRM管理");
appMap.set("com.x.base.core.project.x_jpush_assemble_control", "极光推送");
appMap.set("zoneland.unicom.bj.assemble.control.zoneland_unicom_bj_assemble_control", "北京联通单点");

    $(function() {
	$.ajax({
	    type : 'get',
	    dataType : 'json',
	    contentType : 'application/json; charset=utf-8',
	    url : '../jaxrs/jest/list',
	    xhrFields : {
		'withCredentials' : true
	    },
	    crossDomain : true
	}).done(function(json) {
	    debugger;
	    if (json.type == 'success') {
		if (json.data) {
		    var str = '<table border="1">';
		    $.each(json.data, function(index, o) {
			str += '<tr>';  
			debugger;
             if(typeof(appMap.get(o.name)) == "undefined"){
			   str += '<td>' + '</td>';
              }else{
				str += '<td>' + appMap.get(o.name) + '</td>';
              }			  
			str += '<td>' + o.name + '</td>';
			str += '<td>';
			$.each(o.urlList, function(i, url) {
			    url = url.replace(/(127.0.0.1)/g, window.location.hostname);
			    str += '<a href="'+url+'" target="_blank">' + url + '</a><br/>';
			});
			str += '</td>';
			str += '</tr>';
		    });
			
			str += '<tr><td>中心服务</td><td>com.x.base.core.project.x_program_center</td><td><a href="http://'+window.location.hostname+':20030/x_program_center/jest/index.html" target="_blank">http://'+window.location.hostname+':20030/x_program_center/jest/index.html</a><br></td></tr>';
		    str += '</table>';
		    $('#content').html(str);
		}

	    }
	});
    });
</script>
</head>

<body style="font-size: 12px; font-family: Microsoft Yahei; margin: 0px">
	<center id="title" style="font-size:32px; font-weight:bold">O2OA Service API URL</center>	
	<div id="content" style="margin-top:10px">&nbsp;</div>
</body>
</html>